/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package syntaxanalyser;

import java.util.ArrayList;

/**
 *
 * @author mark_o
 */
public class PostfiksX extends Postfiks
{
    public void set_var(double x)
    {
        ArrayList v = new ArrayList();
        v.add(x);
        super.set_var(v);
    }


    public double Valuete(double x) throws Exception
    {
        set_var(x);
        return super.Valuete();
    }

    public static double Calculate(String func, double x) throws Exception
    {
        PostfiksX p = new PostfiksX();
        p.input(func);
        p.set_var(x);
        return p.Valuete();
    }
}
